package com.wf.course.service;

import java.util.ArrayList;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.utils.page.PageBean;
import com.wf.course.model.goods.GoodsOrderRelation;

public interface IGoodsOrderRelationService {
	/**
	 * 根据pageBean中封装的查询条件查询
	 * @param pageBean
	 * @return
	 */
	public void indexInfo(PageBean<GoodsOrderRelation> pageBean);
	/**
	 * 添加或修改
	 * @param 
	 */
	public void saveGoodsOrderRelationOrUpdate(GoodsOrderRelation goodsOrderRelation);
	/**
	 * 查询
	 * @param 
	 */
	public GoodsOrderRelation queryGoodsOrderRelationById(Integer id);
	/**
	 * 删除
	 * @param id
	 */
	public void deleteById(Integer id);
	
	
	/**
	 * 根据订单编号查询
	 * @param pageBean
	 * @return
	 */
	public List<GoodsOrderRelation> queryOrderGoodsList(String orderCode);
	
	/**
	 * 根据订单编号，查询订单详情
	 * @param orderCode
	 * @return
	 */
	public List<GoodsOrderRelation> queryOrderGoodsListByOrderCode(@Param("orderCode") String orderCode) ;
	/**
	 * 查询课程销售总额
	 * @param userSource
	 * @param orderBeginTime
	 * @param orderEndTime
	 * @return
	 */
	public List<GoodsOrderRelation> getCourseAmount(String userSource,String  orderBeginTime, String orderEndTime);
	/**
	 * 查询商品销售总额
	 * @param userSource
	 * @param orderBeginTime
	 * @param orderEndTime
	 * @return
	 */
	public List<GoodsOrderRelation> getGoodsAmount(String userSource,String  orderBeginTime, String orderEndTime);
	
	
	/**
	 * 根据订单号删除
	 * @param id
	 */
	public void deleteByOrderCode(String OrderCode);
	
	/**
	 * 按商品统计销售额
	 * @param pageBean
	 * @return
	 */
	public void getGoodsSale(PageBean<GoodsOrderRelation> pageBean);
	
	/**
	 * 根据pageBean中封装的查询条件查询,用于销售额导出
	 * @param pageBean
	 * @return
	 */
	public List<GoodsOrderRelation> exportGoodSales(PageBean<GoodsOrderRelation> pageBean);
	
	
	/**
	 * 修改退货标识
	 * @param id
	 */
	public void updateBackFlag(Integer id);
	
	/**
	 * 商品销售统计
	 * @param goodsSort
	 * @return
	 */
	public String goodsSalesStatistics();
	
	/**
	 * 商品分类销售查询
	 * @param goodsSort
	 * @param id
	 * @return
	 */
	public String goodsCategoriesSales(Integer goodsSort,Integer id);
	

	/**
	 * 根据小时查询商品分类销售量
	 * @param goodsSort
	 * @param id
	 * @param orderPayTime
	 * @return
	 */
	public String goodsCategoriesSalesByTimes(@Param("goodsSort") Integer goodsSort,@Param("id") Integer id,@Param("orderPayTime") String orderPayTime);
	
	/**
	 * 根据日期查询商品分类销售量（按选中时间近七日：前四日后两日）
	 * @param goodsSort
	 * @param id
	 * @param orderPayTime
	 * @return
	 */
	public String goodsCategoriesSalesByDay(@Param("goodsSort") Integer goodsSort,@Param("id") Integer id,@Param("orderPayTime") String orderPayTime);

	List<GoodsOrderRelation> newExportGoodSales(
			Integer goodsSort, String userSource, String orderBeginTime, String orderEndTime, String speakerName);

	void newGetGoodsSale(PageBean<GoodsOrderRelation> pageBean);

	List<GoodsOrderRelation> exportPurchaseAmountExcel(String beginTime, String endTime);

	void purchaseAmountList(PageBean<GoodsOrderRelation> pageBean);
}
